<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>品牌管理</title>
    <link rel="stylesheet" type="text/css" href="__STATIC__/hdjs/hdjs.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap.min.css"/>
    <script src="__STATIC__/js/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC__/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
    <style type="text/css">
        a:hover{
                text-decoration: none;
        }
    </style>
</head>
<body>
<div class="wrap">
    <table class="hd-table hd-table-list">
        <thead>
        <tr pid=0>
            <td>品牌id</td>
            <td>品牌名称</td>
            <td>排序</td>
            <td>友情链接Logo</td>
            <td>是否热门</td>
            <td>是否显示</td>
            <td width="200">操作</td>
        </tr>
        </thead>
        <tbody>
            <foreach from="$data" key="$k" value="$v">
                <td>{$v.bid}</td>
                <td>{$v.bname}</td>
                <td>{$v.sort}</td>
                <td><img src="__ROOT__/{$v.logo}" style="width:80px;" /></td>
                <td>
                        <if value="$v['is_hot'] == 1">
                            <span class="glyphicon glyphicon-ok"></span>
                        <else/>
                            <span class="glyphicon glyphicon-remove"></span>
                        </if>
                </td>
                <td>
                        <if value="$v['is_lock'] == 0">
                            <span class="glyphicon glyphicon-ok"></span>
                        <else/>
                            <span class="glyphicon glyphicon-remove"></span>
                        </if>
                </td>
                <td width="200">
                    <a href="{|U:'edit',array('bid'=>$v['bid'])}" class="hd-btn hd-btn-success">编辑</a>
                    <a href="javascript:del_modal({$v.bid});" class="hd-btn hd-btn-danger">删除</a>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <style type="text/css">
            .page_hdcms{
                margin-top: 20px;
                text-align: center;
            }
            .page_hdcms a{
                padding: 3px 5px;
                margin-left: 3px;
                border: 1px solid #CCCCCC;
                
            }
            .page_hdcms strong{
                padding: 3px 5px;
                margin-left: 3px;
                background: red;
                color: white;
            }
    </style>
    <div class="page_hdcms">
        {$page}
    </div>
</div>

</body>
<script type="text/javascript">
    function del_modal(bid){
        hd_modal({
            width: 400,//宽度
            height: 120,//高度
            title: '确认删除吗？',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: true,//背景遮罩
            shadeOpacity: 0.3,//背景透明度
            success: function () {//点击确定后的事件
                location.href='{|U:"del"}' + '&bid=' + bid;
            },
            cancel: function () {//点击关闭后的事件

            }
        });
    }
</script>
</html>


